import torch

a = torch.tensor([1, 2, 3], dtype=int)
print(a)
print(a.dtype)
b = torch.tensor([4, 5, 6], dtype=float)
print(b)
tensor = torch.tensor([[1, 2, 3], [4, 5, 6]])
print(tensor)
print(tensor.ndim)  # 维度
print(tensor.shape)
